#!/bin/sh

pnpm lint-staged || exit 1

for FILE in `git diff --cached --name-only`; do
	if [ -f $FILE ] && [ ! -L $FILE ]; then
		perl -pi -e 'chomp if eof' $FILE
		git add $FILE
	fi
done